const options = {
    goneMarginStart: 10,
    goneMarginTop: 20,
    // goneMarginEnd: 30, // 这个属性没有定义，示例目的
    goneMarginBottom: 40
};

let goneMarginMap = {
    ...(options.goneMarginStart && { start: options.goneMarginStart }),
    ...(options.goneMarginTop && { top: options.goneMarginTop }),
    ...(options.goneMarginEnd && { end: options.goneMarginEnd }),
    ...(options.goneMarginBottom && { bottom: options.goneMarginBottom }),
};

console.log(goneMarginMap); // 输出: { start: 10, top: 20, bottom: 40 }
